package app.dev.ems.web.wicket.panel.menu.horizontal.admin;

import java.io.Serializable;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.link.Link;

import app.dev.ems.web.element.NavigationStatus;
import app.dev.ems.web.wicket.factory.MenuContainerFactory;
import app.dev.ems.web.wicket.factory.NavigationLinkFactory;
import app.dev.ems.web.wicket.panel.menu.horizontal.BaseHorizontalMenuPanel;

public class AdminHorizontalMenuPanel extends BaseHorizontalMenuPanel {

	private static final long serialVersionUID = -3510348979716812686L;

	public AdminHorizontalMenuPanel(String id) {
		super(id);
		
		WebMarkupContainer homeContainer = MenuContainerFactory.INSTANCE.getHomeContainer();
		Link<Serializable> home = NavigationLinkFactory.INSTANCE.getUserHomeLink();
		add(homeContainer.add(home));
		getMenuMap().put(NavigationStatus.HOME, new Component[] { homeContainer, home });
		
		WebMarkupContainer userAdministrationContainer = MenuContainerFactory.INSTANCE.getUserAdministrationContainer();
		Link<Serializable> userAdministration = NavigationLinkFactory.INSTANCE.getUserAdministrationLink();
		add(userAdministrationContainer.add(userAdministration));
		getMenuMap().put(NavigationStatus.USER_ADMINISTRATION, new Component[] { userAdministrationContainer, userAdministration });

		setSelectedLink();
	}
}
